<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
    <title></title>
	<link rel="stylesheet" type="text/css" href="${path}/css/main.css">
	<link rel="stylesheet" type="text/css" href="${path}/css/mainTable.css">
	<script type="text/javascript">
		/**删除操作*/
		function remove(id,sp_code){
			if(confirm("删除后无法恢复!你确定要删除吗?")){
				var actionUrl = "${path}/configBusiness/deleteConfigBusiness.action";
				var params = "configBusinessVo.id="+id+"&configBusinessVo.sp_code="+sp_code;
				params = encodeURI(params);
				params = encodeURI(params);
				window.location.href=actionUrl+'?'+params;
			}
		}
	</script>
  </head>
  <body>
    <div>
    	<p>新增业务短号码 <a href="${path }/configBusiness/addConfigBusiness.action" title="添加业务短号码">添加</a></p>
    	<div>
    		<table>
    			<thead>
    				<tr>
    					<th>编号</th>
    					<th>业务短号码</th>
    					<th>日限(分)</th>
    					<th>月限(分)</th>
    					<th>单次时限(分)</th>
    					<th>屏蔽省份</th>
    					<th>屏蔽城市</th>
    					<th>计费类型</th>
    					<th>计费金额(分)</th>
    					<th>屏蔽开始时间</th>
    					<th>屏蔽结束时间</th>
    					<th>创建时间</th>
    					<th>操作</th>
    				</tr>
    			</thead>
    			<c:choose>
    				<c:when test="${configBusinessVoList != null && fn:length(configBusinessVoList) > 0}">
    					<c:forEach var="configBusinessVo" items="${configBusinessVoList }" varStatus="list">
    						<tr style="${list.index%2 != 0 ? 'background-color: #fea;' : 'background-color: #fff;' }">
    							<td>${configBusinessVo.id }</td>
    							<td>
    								<a href="${path }/configBusiness/editConfigBusiness.action?configBusinessVo.id=${configBusinessVo.id }">${configBusinessVo.sp_code }</a>
    							</td>
    							<td>${configBusinessVo.day_limit }</td>
    							<td>${configBusinessVo.month_limit }</td>
    							<td>${configBusinessVo.one_shot_limit }</td>
    							<td>${configBusinessVo.forbidden_province }</td>
    							<td>${configBusinessVo.forbidden_city }</td>
    							<td>
    								<c:choose>
    									<c:when test="${configBusinessVo.fee_type == 1 }">按时计费</c:when>
    									<c:when test="${configBusinessVo.fee_type == 2 }">按条计费</c:when>
    									<c:otherwise>其他计费类型</c:otherwise>
    								</c:choose>
    							</td>
    							<td>${configBusinessVo.fee_code }</td>
    							<td>${configBusinessVo.start_time }</td>
    							<td>${configBusinessVo.end_time }</td>
    							<td>${configBusinessVo.add_date }</td>
    							<td>
    								<a href="javascript:remove(${configBusinessVo.id },'${configBusinessVo.sp_code }');">删除</a>
    							</td>
    						</tr>
    					</c:forEach>
    				</c:when>
    				<c:otherwise>
    					<tr>
    						<td>暂无业务短号码配置信息<td>
    					</tr>
    				</c:otherwise>
    			</c:choose>
    		</table>
    	</div>
    </div>
  </body>
</html>
